#!/bin/sh
# vim: set ts=4:

crashed=$(doas -n rc-status --crashed)

if [ -n "$crashed" ]; then
	echo "CRITICAL - crashed services: ${crashed//$'\n'/, }"
	exit 2
else
	echo 'OK'
fi
